﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TabLinesEuro.ascx.cs" Inherits="BigLotterySyndicate.Secured.Draws.Controls.TabLinesEuro" %>
<asp:MultiView ID="MultiViewList" runat="server">
<asp:View ID="ViewList" runat="server">
<p>
Results: 
</p>
<table cellpadding="2" cellspacing="2" style="float:left" border="0">
<tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td class="left">Numbers</td>
    <td class="left">Lucky stars</td>
    <td class="left">Millionaire Raffle</td>
</tr>
<tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td style="vertical-align:top" ><div class="numbers-euro"><%= PrintResults() %></div></td>
    <td style="vertical-align:top"><%= PrintResultsLuckyStars() %></td>
    <td style="vertical-align:top"><div style="overflow-x:hidden;height:40px;width:180px;overflow-y:auto"><%= PrintResultsRaffle() %></div></td>
    <td>&nbsp;</td>
</tr>
</table>
<div style="clear:both;width:100%;height:12px"><!-- --></div>
<table cellpadding="2" cellspacing="2" style="float:left" border="0">
<thead>
<tr>
    <th>&nbsp;</th>
    <th><asp:PlaceHolder ID="PlaceHolderGlobalCheckBox" runat="server" >
                                                                <script type="text/javascript">
    document.write("<input type='checkbox' id='CheckboxToggleParent' onclick='ToggleAllCheckboxes(this)'/>");

    function ToggleAllCheckboxes(el) {
        var state = el.checked;
        while (el && el.tagName.toLowerCase() != "table") {
            el = el.parentNode;
        }
        if (el) {
            var inputs = el.getElementsByTagName("input");
            for (var idx = 0; idx < inputs.length; idx++) {
                if (inputs[idx].id != "CheckboxToggleParent" && inputs[idx].type.toLowerCase() == "checkbox")
                    inputs[idx].checked = state;
            }
        }
    }
</script>
        <noscript>&nbsp;</noscript>
    </asp:PlaceHolder></th>
    <th class="left">Numbers</th>
    <th class="left">Lucky stars</th>
    <th class="left">Millionaire Raffle</th>
    <th class="left">&nbsp;</th>
</tr>
</thead>
<tbody>
    <asp:Repeater ID="RepeaterList" runat="server">
        <ItemTemplate>
        <tr>
            <td><%# Container.ItemIndex+1 %>.</td>
            <td><asp:PlaceHolder ID="PlaceHolderAction" runat="server"><input type="checkbox" runat="server" id="chkAction"/></asp:PlaceHolder></td>
            <td><%# PrintNumbers(Container.DataItem) %></td>
            <td><%# PrintLuckyStars(Container.DataItem) %></td>
            <td><%# PrintRaffle(Container.DataItem) %></td>
            <td><%# PrintMatches(Container.DataItem) %></td>
        </tr>  
        </ItemTemplate>
    </asp:Repeater>
</tbody>
<tfoot>
    <tr>
        <td colspan="6"><asp:Button ID="ButtonRemove" Text="Remove selected lines" runat="server" onclick="ButtonRemove_Click" /></td>
    </tr>
</tfoot>
</table>
</asp:View>
<asp:View ID="ViewEmpty" runat="server">
<p>No lines found.</p>
</asp:View>
</asp:MultiView>
<asp:PlaceHolder ID="PlaceHolderDrawOpen" runat="server">
<p style="float:left; width:100%;">
Remaining funds: <%= PrintRemaining() %>
</p>
<p style="float:left; width:100%;">
<asp:HyperLink ID="linkAddLine" Text="Add new line" runat="server"></asp:HyperLink>
</p>
<p style="float:left; width:100%;">
<asp:HyperLink ID="linkAddOldLines" Text="Add lines from previous draw" runat="server"></asp:HyperLink>
</p>
</asp:PlaceHolder>